
cmake_minimum_required(VERSION 3.10)
project(MyOpenCVProject)

set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O3")
#set(OpenCV_DIR  ${CMAKE_CURRENT_SOURCE_DIR}/mips/lib/cmake/opencv4)
set(OpenCV_DIR  ${CMAKE_CURRENT_SOURCE_DIR}/x86/lib/cmake/opencv4)
find_package(OpenCV REQUIRED)
# 后续配置与方法一相同
message(STATUS "OpenCV 库状态:")
message(STATUS "    版本: ${OpenCV_VERSION}")
message(STATUS "    头文件路径: ${OpenCV_INCLUDE_DIRS}")
message(STATUS "    库文件: ${OpenCV_LIBS}")

add_executable(cartoon alignedface.cpp  cartoon.cpp cartoonnet2.cpp  facecompose.cpp  facedetect.cpp)
target_include_directories(cartoon PRIVATE ${OpenCV_INCLUDE_DIRS})
target_link_libraries(cartoon PRIVATE ${OpenCV_LIBS})
